package com.mzy.datepackage.M2022.Aug.thirty_first.service.tasks.db_sync;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 子任务，每个表一个任务
 * */
@Data
@ApiModel(value = "子任务")
public class SubTask {

    /**
     * 表结构是否一致
     * */
    @JSONField(name = "tablecompare")
    @ApiModelProperty(value = "表结构是否一致，可选值true/false")
    private boolean tableCompare;
    /**
     * 源表名
     * */
    @JSONField(name = "stablename")
    @ApiModelProperty(value = "源表名，不能为空")
    private String sourceTableName;
    /**
     * 源表标识列
     * */
    @JSONField(name = "sidentityarray")
    @ApiModelProperty(value = "源表标识列，不能为空")
    private List<String> sourceIdentityArray;
    /**
     * 源端数据资源
     * */
    @JSONField(name = "ssyncdsn")
    @ApiModelProperty(value = "源端数据资源，不能为空")
    private String sourceSyncDsn;
    /**
     * 目标表名
     * */
    @JSONField(name = "ttablename")
    @ApiModelProperty(value = "目标表名，暂时不填")
    private String targetTableName;
    /**
     * 目标表标识列
     * */
    @JSONField(name = "tidentityarray")
    @ApiModelProperty(value = "目标表标识列，暂时不填")
    private List<String> targetIdentityArray;
    /**
     * 目标端数据资源
     * */
    @JSONField(name = "tsyncdsn")
    @ApiModelProperty(value = "目标端数据资源，暂时不填")
    private String targetSyncDsn;
    /**
     * 源端条件过滤where子句
     * */
    @JSONField(name = "swhere")
    @ApiModelProperty(value = "源端条件过滤where子句，选填")
    private String sourceWhere;
    /**
     * 目标端条件过滤where子句
     * */
    @JSONField(name = "twhere")
    @ApiModelProperty(value = "目标端条件过滤where子句,暂时不填")
    private String targetWhere;
    /**
     * 监控类型
     * */
    @ApiModelProperty(value = "监控类型，不能为空，可选值(多选，默认为全选)：INSERT/UPDATE/DELETE")
    private List<String> triggerEventType;
    /**
     * 源表字段
     * */
    @JSONField(name = "scolumnnamestring")
    @ApiModelProperty(value = "源表字段，不能为空")
    private List<String> sourceColumnNameString;
    /**
     * 源表字段类型
     * */
    @JSONField(name = "sdatatypestring")
    @ApiModelProperty(value = "源表字段类型，不能为空")
    private List<String> sourceDataTypeString;
    /**
     * 目标表字段
     * */
    @JSONField(name = "tcolumnnamestring")
    @ApiModelProperty(value = "目标表字段，暂时不填")
    private List<String> targetColumnNameString;
    /**
     * 目标表字段类型
     * */
    @JSONField(name = "tdatatypestring")
    @ApiModelProperty(value = "目标表字段类型，暂时不填")
    private List<String> targetDataTypeString;

    @JSONField(name = "index")
    @ApiModelProperty(value = "不知道是啥玩意")
    private List index;

    @JSONField(name = "sort")
    @ApiModelProperty(value = "同步顺序")
    private String sort;


//    @ApiModelProperty(value = "操作类型，NO_OPS无操作、ADD添加、UPDATE修改、DELETE删除")
//    private OperateEnum operateEnum;

}
